package com.tz.farmer.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.smartPark.msframe.result.ResultEx;
import com.tz.farmer.mapper.EnrollInfoMapper;
import com.tz.farmer.mapper.FarmerActivesMapper;
import com.tz.farmer.model.EnrollInfo;
import com.tz.farmer.model.FarmerActivesResult;
import com.tz.farmer.service.ActivityService;
import com.tz.farmer.so.BaseSo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActivityServiceImpl extends ServiceImpl<EnrollInfoMapper, EnrollInfo>  implements ActivityService {

    @Autowired
    FarmerActivesMapper farmerActivesMapper;

    @Override
    public ResultEx getActivityInfos(BaseSo baseSo) throws Exception{
        List<FarmerActivesResult> farmerActives = farmerActivesMapper.selectActivityInfos(baseSo);
        return ResultEx.builder().makeSuccessResult(farmerActives);
    }
}
